// 配置权限相关路由表 prefix: auth
import {Route} from '@srcTypes/route';
import {requestLogger} from '@srcMiddleware/request-logger';
import {
    authenDocSdkV2,
    authenSdkV2,
    clearAppInfoV2,
    getAppAccessTokenV2, qCodeAuth,
    redirectUrlV2,
} from '@srcHandlers/auth/v2/auth_v2';

export const authRoutesV2: Route[] = [
    {
        method: 'get',
        path: '/auth/v2/getAppAccessToken',
        middleware: [requestLogger],
        handler: getAppAccessTokenV2,
    },
    {
        method: 'post',
        path: '/auth/v2/getAppAccessToken',
        middleware: [requestLogger],
        handler: getAppAccessTokenV2,
    },
    {
        method: 'get',
        path: '/auth/v2/redirectUrl',
        middleware: [requestLogger],
        handler: redirectUrlV2,
    },
    {
        method: 'get',
        path: '/auth/v2/authenSdk',
        middleware: [requestLogger],
        handler: authenSdkV2,
    },
    {
        method: 'post',
        path: '/auth/v2/authenDocSdk',
        middleware: [requestLogger],
        handler: authenDocSdkV2,
    },
    {
        method: 'delete',
        path: '/auth/v2/clearAppInfo',
        middleware: [requestLogger],
        handler: clearAppInfoV2,
    },
    {
        method: 'get',
        path: '/auth/v2/qcode_auth',
        middleware: [requestLogger],
        handler: qCodeAuth,
    },
];
